{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "27\n",
      "27\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAARsAAADGCAYAAADi+iRkAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAPYQAAD2EBqD+naQAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJztnXl8XXWd99/fe2/2tUnapG2atqF76V5oi9CyFx50AAUGUUcd2Rxncx5nHpnxcRx9XsOgIzKjVQEZGR4RRwUBHSxYKWChdIOWLnSBLmmaJm2afV/ub/4499yeXrLc5dwt/b5fr/NKc8/Jub+eJJ98958YY1AURYk3nmQvQFGU8wMVG0VREoKKjaIoCUHFRlGUhKBioyhKQlCxURQlIajYKIqSEFRsFEVJCCo2iqIkBBUbRVESQsRiIyKTReQnInJGRLpFZLeILHecFxH5uoicDJzfICIz3V22oijphi+Si0VkHPA6sBG4HjgNzASaHZf9HfCXwKeBI8A3gBdFZJ4xpieM9xBgEtAeydoURUkoBUCdiaS50hgT9gH8C/CHEc4LcBL4kuO1IqAHuD3M95gMGD300CPlj8mR6EdElg3wR1hWyi+ANcAJ4PvGmEcD56cDFcAG+wuMMa0isgVYBfws9IYikgVkhb5+/PhxCgsLI1yeoijxpq2tjSlTpkCE3kekYlMNfB54EPhn4CLg30Wkzxjzn1hCA9AQ8nUNjnOh3Af8Y+iLhYWFKjaKMoaINEDsAd4yxvy9MeZtY8wjwKPAvTGs4X4sV8s+KmO4l6IoKUqkYnMS2Bfy2rtAVeDf9YGP5SHXlDvOnYMxptcY02YfaGBYUcYkkYrN68DskNdmAccC/z6CJSpX2SdFpBBYAWyOco2KoowBIhWb7wArReTvRWSGiNwB3A2sAwikwR4CviIifyQiC4AngDrgWRfXrQB+v+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2Wm38+EIfDPNEMfjgfMCfB3LwunBygbMSva6U+kY5vkZ4DOOa7KxRKkJq1bpGaAi2WtPpQN4DDiKNUriVOBn7ZpEPEMdMaEoSkLQmI2iKAlBxUZRlISgYqMoSkJQsVEUJSGo2CiKkhBUbBRFSQgqNoqiJAQVG0VREoKKjaIoCUHFRlGUhKBioyhKQlCxURQlIfwPL5ojqdBkd3EAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 300x200 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 创建画布\n",
    "import matplotlib.pyplot as plt\n",
    "import random\n",
    "plt.figure(figsize=(3,2),dpi=100)\n",
    "# 绘图\n",
    "y=[7,10,10,4,14,29,25,17,58,43,20,7,7,8,29,19,10,29,24,25,14,8,15,9,12,9,16]\n",
    "x=range(4,31,1)\n",
    "print(len(x))\n",
    "print(len(y))\n",
    "\n",
    "plt.plot(x,y)\n",
    "# 添加样式放在show前面\n",
    "\n",
    "# 展示\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "ename": "AttributeError",
     "evalue": "module 'matplotlib' has no attribute 'FontProperties'",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mAttributeError\u001b[0m                            Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-15-7a33e4978417>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m      3\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mmatplotlib\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mfont_manager\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      4\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mrandom\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 5\u001b[0;31m \u001b[0mmy_font\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mfont_manager\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mFontProperties\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfname\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'/System/Library/Fonts/Hiragino Sans'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m      6\u001b[0m \u001b[0mplt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfigure\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfigsize\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m10\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m2\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mdpi\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m100\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      7\u001b[0m \u001b[0;31m# 绘图\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;31mAttributeError\u001b[0m: module 'matplotlib' has no attribute 'FontProperties'"
     ]
    }
   ],
   "source": [
    "# 创建画布\n",
    "import matplotlib.pyplot as plt\n",
    "import matplotlib as font_manager\n",
    "import random\n",
    "my_font=font_manager.FontProperties(fname='/System/Library/Fonts/Hiragino Sans')\n",
    "plt.figure(figsize=(10,2),dpi=100)\n",
    "# 绘图\n",
    "y=[7,10,10,4,14,29,25,17,58,43,20,7,7,8,29,19,10,29,24,25,14,8,15,9,12,9,16]\n",
    "x=range(4,31,1)\n",
    "print(len(x))\n",
    "print(len(y))\n",
    "\n",
    "plt.plot(x,y)\n",
    "# 添加样式放在show前面\n",
    "# 将x微字符创\n",
    "\n",
    "_x=list(x)\n",
    "_xtick=['6月{}号'.format(i) for i in range(4,31)]\n",
    "plt.xticks(_x,_xtick,fontproperties=my_font)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
